package com.bc.bcmodel.resp;

import com.bc.bcmodel.consts.MultiLanguage;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Name AccountLogInfoResp
 * @Description
 * @Author douhaichao
 * @Date 2018/8/22 14:10
 * @Version 1.0
 **/
public class AccountLogInfoResp {
    private String type;
    private BigDecimal amount;
    private Date modify_time;
    private String amount_type;

    private String language = "CH";
    public void setLanguage(String language) {
        this.language = language;
    }

    public String getAmount_type() {
        return amount_type;
    }

    public void setAmount_type(String amount_type) {
        this.amount_type = amount_type;
    }

    public String getStatus() {
        if (status.equals("1")) {
            return language.equals("CH") ? MultiLanguage.transStatusCH.get(status) : MultiLanguage.transStatusEN.get(status);
        }
        return language.equals("CH") ? MultiLanguage.transStatusCH.get("2") : MultiLanguage.transStatusEN.get("2");
    }

    public void setStatus(String status) {
        this.status = status;
    }

    private String status;

    public Date getModify_time() {
        return modify_time;
    }

    public void setModify_time(Date modify_time) {
        this.modify_time = modify_time;
    }


    public String getType() {
        if (language.equals("CH") ) {
            return type;
        } else {
            return MultiLanguage.transType.getOrDefault(type, MultiLanguage.UNKNOWN);
        }
    }

    public void setType(String type) {
        this.type = type;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

}
